﻿using System;

namespace Entities
{
    [Serializable]
    public class tblOrder
    {
        private int customer_id;
        private int customer_group_id;
        private int user_id;
        private int total;
        private int order_status_id;
        private int currency_id;
        private int coupon_id;
        private DateTime date_added;
        private DateTime date_modified;

        public tblOrder() {}

        public tblOrder(int customer_id, int customer_group_id, int user_id, int total, int order_status_id, int currency_id, int coupon_id, DateTime date_added, DateTime date_modified)
        {
            this.customer_id = customer_id;
            this.customer_group_id = customer_group_id;
            this.user_id = user_id;
            this.total = total;
            this.order_status_id = order_status_id;
            this.currency_id = currency_id;
            this.coupon_id = coupon_id;
            this.date_added = date_added;
            this.date_modified = date_modified;
        }

        public int customerID
        {
            get { return this.customer_id; }
            set
            {
                this.customer_id = value;
            }
        }

        public int customerGroupID
        {
            get { return this.customer_group_id; }
            set
            {
                this.customer_group_id = value;
            }
        }

        public int userID
        {
            get { return this.user_id; }
            set
            {
                this.user_id = value;
            }
        }

        public int Total
        {
            get { return this.total; }
            set
            {
                this.total = value;
            }
        }

        public int orderStatusID
        {
            get { return this.order_status_id; }
            set
            {
                this.order_status_id = value;
            }
        }

        public int currencyID
        {
            get { return this.currency_id; }
            set
            {
                this.currency_id = value;
            }
        }

        public int couponID
        {
            get { return this.coupon_id; }
            set
            {
                this.coupon_id = value;
            }
        }

        public DateTime dateAdded
        {
            get { return this.date_added; }
            set
            {
                this.date_added = value;
            }
        }

        public DateTime dateModified
        {
            get { return this.date_modified; }
            set
            {
                this.date_modified = value;
            }
        }

        public override string ToString()
        {
            return this.customer_id + "; " + this.customer_group_id + "; " + this.user_id + "; " + this.total + "; " + this.order_status_id + "; " + this.currency_id + "; " + this.coupon_id + "; " + this.date_added + "; " + this.date_modified + "; ";
	    }
	    public override bool Equals(Object obj)
	    {
            tblOrder me = (tblOrder)obj;
            bool ret = this.customerID.Equals(me.customerID);
	        return ret;
	    }
	    public override int GetHashCode()
	    {
            return this.customerID.GetHashCode();
	    }

    }
}
